package com.example.controller;

import com.example.api.InventoryApi;
import com.example.dto.InventoryDTO;
import com.example.service.InventoryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class InventoryController implements InventoryApi {
    private static final Logger LOGGER = LoggerFactory.getLogger(InventoryController.class);
    @Autowired
    private InventoryService inventoryService;

    @Override
    public String decrease(InventoryDTO obj) {
        LOGGER.info("进入库存的controller..........");
        this.inventoryService.decrease(obj);
        return  "1";
    }
}
